package com.project;

import com.project.bean.RoomBean;
import com.project.bean.UnitBean;
import com.project.config.MyBatisConfig;
import com.project.service.IRoomService;
import com.project.service.IUnitService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.time.LocalDate;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = MyBatisConfig.class)
public class test {
    @Autowired
    private IRoomService service;

    @Autowired
    private IUnitService unitService;

    @Test
    public void test(){
//        System.out.println(service.findById(1));
//        System.out.println(service.findByItem(null,"不限","不限","男"));
//        service.del(5);
//        service.add(new RoomBean("龙窝小区","女寝",10));


//        unitService.update(1,2);
//        System.out.println(unitService.findAll(2));
//        unitService.add(new UnitBean("书桌损坏", LocalDate.now(),"未解决",9),2);
    }
}
